import server from '../../server' 

//请求头部轮播图数据
const getBanners = async() =>{
    let { data } = await server.get('https://api.it120.cc/small4/banner/list')
    return data
}

//请求砍价下面的数据
const getBarGin = async(params) =>{
    // let { data } = await server.get('https://api.it120.cc/small4/shop/goods/list' ,params)
    var data = await server({
        method: "GET",
        url: "https://api.it120.cc/small4/shop/goods/list",
        params,
    })
    return data
}


//请求电影的数据
const getMovie = async() =>{
    let { data } = await server.get('https://api.it120.cc/small4/cms/news/list')
    return data
}
//请求商品列表数据
const getList = async() =>{
    let { data } = await server.post('https://api.it120.cc/small4/shop/goods/category/all')
    return data
}
export {
    getBanners,
    getBarGin,
    getMovie,
    getList 
}
    